<?php

/* 
 * @author Donald Barclay
 * @Published 17 March 2014
 */

/*
 * Parameters for an appointment/timeslot
 */
class timeSlot{
private $appointmentID;
private $clinician;
private $client; 
private $appointmentTime;
private $monthID;
private $dayID;
private $booked;

}
/*
 * Constructor
 */
function _construct($a,$clin,$cli,$m,$d){
    $this -> appointmentID = $a;
    $this -> clinician = $clin;
    $this -> client = $cli;
    $this -> appointmentTime = $a;
    $this -> monthID = $m;
    $this -> dayID = $d;
    $this -> booked = FALSE;
    
        Switch(appointmentTime){
            case 0: $appointmentTime="0900";
            case 1: $appointmentTime="0915";
        }
}
/*
 * Function for changing boolean to read TRUE as a booked appointment
 * Displays success or failure
 */
function setBooked($id){
    if ($id -> booked == FALSE){
    $id -> booked = TRUE;
    echo 'Appointment booked successfully';
    }
    else echo 'Appointment not booked';
}

function isBooked(){
    return $this -> booked;
}